<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>无过渡逐帧动画</title>
    <style>
        div:nth-of-type(1){
            background:url(tu.png);
            width:32px;
            height:35px;
            animation:a1 .5s steps(4,end) infinite;
        }
        div:nth-of-type(2){
            width:100px;
            height:100px;
            background:red;
            animation:a2 1s step-end forwards;
        }
        @keyframes a1{
            100%{
                background-position:0 -139px;
            }
        }
        @keyframes a2{
            0%{
                background:rgb(193, 132, 15);
            }
            50%{
                background:rgb(17, 226, 63);
            }
            100%{
                background:rgb(84, 17, 226);
            }
        }
    </style>
</head>
<body>
    <div></div>

    <div></div>
</body>
</html>
